#include <iostream>
#include "PWaveData3D.h"


void PWaveData3D::allocate() {
#ifdef __DEBUG__
    std::cout << "size to allocate: " << 4 * this->blk_domain_size << "\n";
#endif
    coeffc2_distr = new double[4 * this->blk_domain_size];
    c2dtq_distr = coeffc2_distr + this->blk_domain_size;
    this->compute_domain = coeffc2_distr + 2 * this->blk_domain_size;
}


void PWaveData3D::free() {
    delete[] coeffc2_distr;
}


void PWaveData3D::init() {
    non_pml_x_min = halo;
    non_pml_x_max = halo;
    for(__int64 i = 0; i < 2 * this->blk_domain_size; i++)
        this->compute_domain[i] = 0;
}
